package com.mlk.engUser.controller;

import com.mlk.core.component.page.Pager;
import com.mlk.core.util.ServerResponse;
import com.mlk.engUser.po.EngUserRemainVerify;
import com.mlk.engUser.service.EngUserRemainVerifyService;
import com.mlk.engUser.vo.EngUserRemainVerifyVO;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.annotation.Resource;

/**
 * 余额提现
 */
@Controller
@RequestMapping("/eng/user/remain/apply")
public class EngUserRemainVerifyController {

    @Resource
    private EngUserRemainVerifyService engUserRemainVerifyService;

    /**
     * 提现申请首页
     * @return
     */
    @RequestMapping("index")
    public String index(){
        return "engUser/remainApply";
    }

    /**
     * 分页查询数据
     * @param verify
     * @return
     */
    @RequestMapping("listPage")
    @ResponseBody
    public Pager listPage(EngUserRemainVerifyVO verify){
        return this.engUserRemainVerifyService.listPage(verify);
    }

    /**
     * 审核通过
     * @return
     */
    @RequestMapping("verifyOK")
    @ResponseBody
    public ServerResponse verifyOK(Integer id){
        return this.engUserRemainVerifyService.verifyOK(id);
    }

    /**
     * 审核驳回
     */
    @RequestMapping("verifyFail")
    @ResponseBody
    public ServerResponse verifyFail(Integer id){
        return this.engUserRemainVerifyService.verifyFail(id);
    }
}
